package com.nisco.dms.service;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * 
 * @author joey
 *
 */
@Component
@Transactional(readOnly = true)
public class CacheService {
	@PersistenceContext
	private EntityManager em;

	public void clearAllCache() {
		em.getEntityManagerFactory().getCache().evictAll();
	}

}
